#ifndef AZDIONIS_H
#define AZDIONIS_H


#include <QString>
#include <QIODevice>

#ifdef AZ_LIB
# define AZLIB_EXPORT Q_DECL_EXPORT
#else
# define AZLIB_EXPORT
#endif

namespace Az {

    enum DataPacketFlag {
        NoPacket           = 0x0,
        MetadataPacket     = 0x1,
        DataPacket         = 0x2,
        DeltaPacket        = 0x4
    };

    enum DataSourcePropertyFlag {
        CanCreateMetadata       = 0x1,
        PermanentConnection     = 0x2
    };

    enum RecordState {
        Unmodified = 0x0,
        Inserted =   0x1,
        Modified =   0x2,
        Deleted =    0x3
    };

Q_DECLARE_FLAGS(DataPacketFlags, DataPacketFlag)
Q_DECLARE_FLAGS(DataSourcePropertyFlags, DataSourcePropertyFlag)

Q_DECLARE_OPERATORS_FOR_FLAGS(Az::DataPacketFlags)
Q_DECLARE_OPERATORS_FOR_FLAGS(Az::DataSourcePropertyFlags)
}

class AZLIB_EXPORT AzError {
public:
    AzError() {}
    AzError(const QString &msg);
    AzError(const AzError&);
    QString message() const { return mMessage; }
protected:
    QString mMessage;
};

typedef AzError AzException;





#endif // AZDIONIS_H
